package com.kly.user.db.dao.impl;
import com.fqgj.common.base.AbstractBaseMapper;
import com.google.common.collect.Maps;
import com.kly.user.db.dao.UserChatterCustomDao;
import com.kly.user.db.entity.UserChatterEntity;
import com.kly.user.db.entity.UserModelEntity;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
* User: linqu
* Date: 2023-06-21
* Time: 10:44:30.534
*/

@Repository
public class UserChatterCustomDaoImpl extends AbstractBaseMapper<UserChatterEntity> implements UserChatterCustomDao {

    @Override
    public List<UserChatterEntity> queryNewMatchList(String chatterUserCode) {
        return this.getSqlSession().selectList(this.getStatement("queryNewMatchList"), chatterUserCode);
    }

    @Override
    public List<UserModelEntity> queryModels(String chatterUserCode, String modelUserCode) {
        Map<String, Object> params = Maps.newHashMap();
        params.put("chatterUserCode", chatterUserCode);
        params.put("modelUserCode", modelUserCode);
        return this.getSqlSession().selectList(this.getStatement("queryModels"), params);
    }

    @Override
    public List<UserModelEntity> queryChatters(String modelUserCode) {
        Map<String, Object> params = Maps.newHashMap();
        params.put("modelUserCode", modelUserCode);
        return this.getSqlSession().selectList(this.getStatement("queryChatters"), params);
    }
}